Skip to main content

Pix Transfer with key

To perform a Pix transfer with a key, it is necessary to first query the key information through the payment initiation endpoint and finally carry out the transfer.

Payment Initialization

This endpoint will provide you with basic data relating to the queried key. Additionally, it will provide the "endToEndId" attribute that will be required by the transfer endpoint if you choose Pix with key.

Info

In the staging environment you'll only be able to make transfers to keys that exist in the staging environment.

Pix Keys examples

Note that a Pix transfer cannot me made from an account to itself.

beneficiary AccountKeyType
31712+5511999975734PHONE
31712[email protected]EMAIL
317121aa5ef56-3b5f-4665-9ece-e7513efc03e5EVP
2982330287697789DOCUMENT
298230a192461-051f-438b-b9c4-2db423039281EVP
2982330287697789DOCUMENT
3042206790157000144DOCUMENT
30422255d38b2-42c1-4593-844d-8e92bd6cb438EVP
30422790aa11-8199-40f5-bfad-6ab99a73ab3aEVP

Below is a request and response example. For more information about the endpoint, click here.

Request

POST 'https://apisandbox.delbank.com.br/baas/api/v2/pix/dict/payment-initialization'

Headers

NameDescription
x-delbank-api-keyRequired. API key

Body

NameTypeDescription
keystringRequired. Pix Key registered in the DICT.
holderDocumentstringOptional. Holder's document to verify if they are the owner of the key being searched. If this field is provided, the Pix key search response will return a FLAG indicating (keyBelongsHolder) whether the key belongs to this holder.

Response

The status code 200 will indicate success in the transaction.

Being successful, the return will bring the following field in JSON format:

Note

🚧 Use the endToEndId attribute in the transfer request.

{
"endToEndId": "E38224857202412201244TP05NXG36QK",
"key": "30287697789",
"beneficiary": {
"number": "29823",
"branch": "1",
"type": "CURRENT",
"participant": {
"name": "DELCRED SCD S.A.",
"ispb": "38224857"
},
"holder": {
"name": "HOMOLOGACAO INTEGRACAO API",
"document": "***876977**",
"type": "NATURAL"
}
},
"keyBelongsHolder": false
}

If the correct holderDocument is passed, the response will be like this:

{
"endToEndId": "E3822485720241220122418yWF7jWUKA",
"key": "30287697789",
"beneficiary": {
"number": "29823",
"branch": "1",
"type": "CURRENT",
"participant": {
"name": "DELCRED SCD S.A.",
"ispb": "38224857"
},
"holder": {
"name": "HOMOLOGACAO INTEGRACAO API",
"document": "***876977**",
"type": "NATURAL"
}
},
"keyBelongsHolder": true
}

Carrying out the payment

After the payment initialization, verify the payee account associated with the returned endToEndId. Execute the transfer endpoint API calling.

Request

POST 'https://apisandbox.delbank.com.br/baas/api/v2/transfers

Headers

NameDescription
x-delbank-api-keyRequired. API key
IdempotencyKeyRequired. Request's idempotency key. Provide a GUID, being a new one for each request..

Body

NameTypeDescription
amountnumberRequired. Transfer amount.
descriptionstringDescription about the transfer. This information will be shown as beneficiary
endToEndIdstringRequired. EndToEndId returned while consulting a DICT key
initiationTypeenumRequired. Initialization type. Use the type 'KEY' in this case

Response

The status code 200 ensures that the transaction has succeeded.

Being successful, the return will bring the following field in JSON format:

Note

🚧 The information will be return after the transfer initialization and the consulting the transfer.

{
"id": "0fc7821d-b488-4268-88c0-a2bc443d046e",
"endToEndId": "E3822485720230808004731LMaDWkOcM",
"transactionNsu": 722355,
"status": "PIX_PROCESSING",
"type": "PIX_KEY",
"amount": 0.55,
"createdAt": "2023-08-08T00:47:31.251Z",
"description": "manual JD",
"payer": {
"number": "31712",
"branch": "0001",
"type": "CURRENT",
"holder": {
"document": "32752023000149",
"name": "bxxdbde",
"type": "LEGAL"
},
"participant": {
"name": "DELBANK",
"ispb": "38224857"
}
},
"beneficiary": {
"number": "46441",
"branch": "0007",
"type": "CURRENT",
"holder": {
"document": "01234567890",
"name": "CICLANO FULANO",
"type": "NATURAL"
},
"participant": {
"name": "BANCO DA AMAZONIA S.A.",
"ispb": "04902979"
}
}
}

Pix Status

NameDescription
PIX_ERRORThere was an error with the transfer
PIX_PROCESSINGThe transfer is being processed
PIX_WAITING_SPI_RESPONSEThe transfer is waiting SPI response
PIX_EFFECTIVEThe transfer was successful
PIX_REFUND_PAYMENT_UPDATEDEvent for sent refunds
info

📘 For more information

For more information and simulations about this endpoint requisition, access the API Reference.